home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / examples / exam09 / main.c < prev    next >
C/C++ Source or Header  |  1995-09-27  |  1KB  |  80 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /*
  7.  *
  8.  *    This source code is CONFIDENTIAL and
  9.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  10.  *    distribution, adaptation or use    may
  11.  *    be subject to civil and    criminal penalties.
  12.  *
  13.  *    Copyright (c) 1993 Algorithms Corporation
  14.  *    3020 Liberty Hills Drive
  15.  *    Franklin, TN  37064
  16.  *
  17.  *    ALL RIGHTS RESERVED.
  18.  *
  19.  *
  20.  *
  21.  */
  22.  
  23.  
  24. #include "generics.h"
  25.  
  26.  
  27. main(int argc, char *argv[])
  28. {
  29.     object    obj;
  30.     long    n;
  31.  
  32.     InitDynace(&argc);
  33.  
  34.  
  35.     /*  The following line is used to turn on the automatic garbage
  36.         collector (un-comment after the first run) */
  37.  
  38. /*    gSetMemoryBufferArea(Dynace, 50000L);    */
  39.  
  40.  
  41.  
  42.     /*  Create enough new objects to fill up all the memory of a PC
  43.         (since no objects are ever explictly disposed).  */
  44.  
  45.     for (n=0 ; n++ != 125000L ; )  {
  46.         if (!(n % 1000L))
  47.             printf("%ld\n", n);
  48.         obj = gNewWithDouble(DoubleFloat, 3.141);
  49.     }
  50.  
  51.     printf("\nCurrent memory usage = %ld\n", gCurMemUsed(Dynace));
  52.     
  53.     return 0;
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. /*
  63.  *
  64.  *    This source code is CONFIDENTIAL and
  65.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  66.  *    distribution, adaptation or use    may
  67.  *    be subject to civil and    criminal penalties.
  68.  *
  69.  *    Copyright (c) 1993 Algorithms Corporation
  70.  *    3020 Liberty Hills Drive
  71.  *    Franklin, TN  37064
  72.  *
  73.  *    ALL RIGHTS RESERVED.
  74.  *
  75.  *
  76.  *
  77.  */
  78.  
  79.  
  80.